﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aier.dataaccess.model
{
    [global::System.AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
    public sealed class XrmEntityAttribute : Attribute
    {
        readonly string entityName;
        readonly string primaryKeyFieldName;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="entityName">实体名</param>
        /// <param name="primaryKeyFieldName">实体主键字段</param>
        public XrmEntityAttribute(string entityName, string primaryKeyFieldName)
        {
            this.entityName = entityName;
            this.primaryKeyFieldName = primaryKeyFieldName;
        }

        public string EntityName
        {
            get { return entityName; }
        }

        public string PrimaryKeyFieldName
        {
            get { return primaryKeyFieldName; }
        }
    }
}
